﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpSphinx.Frontend
{
     public class DataStartSignal : Signal 
    {
         private int SampleRate;



         public static String Speech_Tagged_Feature_Stream = "vadTaggedFeatureStream"; 

         

         public DataStartSignal(int SampleRate)
             : base(System.DateTime.Now.Millisecond)
         {
             this.SampleRate = SampleRate;
             
         }

         public DataStartSignal(int sampleRate, bool tagAsVadStream)
             : base(System.DateTime.Now.Millisecond)
         {
             this.SampleRate = sampleRate;
             
         }

         public DataStartSignal(int sampleRate, long time , bool tagAsVadStream)
             : base(System.DateTime.Now.Millisecond)
         {
             this.SampleRate = sampleRate;

             if (tagAsVadStream) {
                 this.getProps().Add(Speech_Tagged_Feature_Stream, tagAsVadStream); 
             }
         }


         public int getSampleRate()
         {
             return SampleRate;
         }

         public static void tagAsVadStream(DataStartSignal dsSignal)
         {
             dsSignal.getProps().Add(DataStartSignal.Speech_Tagged_Feature_Stream, true);
         }

         public static void UntagAsVadStream(DataStartSignal dsSignal)
         {
             dsSignal.getProps().Remove(DataStartSignal.Speech_Tagged_Feature_Stream);
         }

         public override string ToString()
         {
             return "DataStartSignal: Creation Time: " + getTime();
         }


    }
}
